
## Functions
############################################################
function clone(){
   pname=$1
   dpath=$2
   git clone https://git.oschina.net/$pname.git $dpath/temp
   mv $dpath/temp/* $dpath/
   rm -rf $dpath/temp
}
# function clone-zip(){
#    pname=$1
#    dpath=$2
#    fname=$3
#    git clone https://git.oschina.net/$pname.git $dpath/temp
#    unzip $dpath/temp/*.zip -d $dpath/temp/unzip
#    mv $dpath/temp/unzip/* $dpath/$fname
#    rm -rf $dpath/temp
# }

function cloneZip(){
   pname=$1
   dpath=$2
   fname=$3
   git clone https://git.oschina.net/$pname.git $dpath/temp
   unzip $dpath/temp/*.zip -d $dpath/temp/unzip
   mv $dpath/temp/unzip/* $dpath/$fname
   rm -rf $dpath/temp
}
